/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainFrame.java
 *
 * Created on 2010-apr-21, 14:48:47
 */

package mvc.gui.impl;

import mvc.core.IMachuPicchu;
import mvc.core.impl.MachuPicchu;

/**
 * 
 * @author Berget
 */
@SuppressWarnings("serial")
public class MainFrame extends javax.swing.JFrame {

	/** Creates new form MainFrame */
	/*
	 * Creates MainFramePresenter.
	 */
	public MainFrame() {
		machu = MachuPicchu.getInstance();
		initComponents();
		new MainFramePresenter(machu, this);

	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")
	// <editor-fold defaultstate="collapsed"
	// desc="Generated Code">//GEN-BEGIN:initComponents
	private void initComponents() {

		toolPanel = new mvc.gui.impl.toolpanel.ToolPanel(machu);
		thumbnailsPanel = new mvc.gui.impl.thumbnailspanel.ThumbnailsPanel(
				machu);
		mainStage = new javax.swing.JPanel();
		imageLabel = new javax.swing.JLabel();

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

		mainStage.setBackground(new java.awt.Color(255, 255, 255));

		imageLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/mvc/gui/resources/Blommabakgrund.jpg"))); // NOI18N

		javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(
				mainStage);
		mainStage.setLayout(jPanel1Layout);
		jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				imageLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 555,
				Short.MAX_VALUE));
		jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				imageLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 520,
				Short.MAX_VALUE));

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout
				.setHorizontalGroup(layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addComponent(thumbnailsPanel,
								javax.swing.GroupLayout.DEFAULT_SIZE, 821,
								Short.MAX_VALUE)
						.addGroup(
								layout
										.createSequentialGroup()
										.addComponent(
												toolPanel,
												javax.swing.GroupLayout.PREFERRED_SIZE,
												javax.swing.GroupLayout.DEFAULT_SIZE,
												javax.swing.GroupLayout.PREFERRED_SIZE)
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
										.addComponent(
												mainStage,
												javax.swing.GroupLayout.DEFAULT_SIZE,
												javax.swing.GroupLayout.DEFAULT_SIZE,
												Short.MAX_VALUE)
										.addContainerGap()));
		layout
				.setVerticalGroup(layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addGroup(
								javax.swing.GroupLayout.Alignment.TRAILING,
								layout
										.createSequentialGroup()
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.LEADING)
														.addComponent(
																toolPanel,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																540,
																Short.MAX_VALUE)
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addGap(
																				20,
																				20,
																				20)
																		.addComponent(
																				mainStage,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				Short.MAX_VALUE)))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
										.addComponent(
												thumbnailsPanel,
												javax.swing.GroupLayout.PREFERRED_SIZE,
												javax.swing.GroupLayout.DEFAULT_SIZE,
												javax.swing.GroupLayout.PREFERRED_SIZE)));

		pack();
	}// </editor-fold>//GEN-END:initComponents

	
	
	
	
	// Variables declaration - do not modify//GEN-BEGIN:variables
	javax.swing.JLabel imageLabel;
	javax.swing.JPanel mainStage;
	private mvc.gui.impl.thumbnailspanel.ThumbnailsPanel thumbnailsPanel;
	private mvc.gui.impl.toolpanel.ToolPanel toolPanel;
	private IMachuPicchu machu;
	// End of variables declaration//GEN-END:variables

}
